Fix floating point math to make diff/terr usable floats.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 19 Apr 2004 19:05:26 +0000 (19:05 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 19 Apr 2004 19:05:26 +0000 (19:05 +0000)
gpsbabel/csv_util.c

index af1396d68c51ef3f48a7c155b449c51f2b447dd5..3f577afec0ffb12ded144581a1f41909f24584ce 100644 (file)
@@ -795,11 +795,11 @@ xcsv_waypt_pr(const waypoint *wpt)
         /* GEOCACHE STUFF **************************************************/
         if (strcmp(fmp->key, "GEOCACHE_DIFF") == 0) {
             /* Geocache Difficulty as a double */
-            sprintf(buff, fmp->printfc, wpt->gc_data.diff / 10);
+            sprintf(buff, fmp->printfc, wpt->gc_data.diff / 10.0);
         } else
         if (strcmp(fmp->key, "GEOCACHE_TERR") == 0) {
             /* Geocache Terrain as a double */
-            sprintf(buff, fmp->printfc, wpt->gc_data.terr / 10);
+            sprintf(buff, fmp->printfc, wpt->gc_data.terr / 10.0);
         } else
         if (strcmp(fmp->key, "GEOCACHE_TYPE") == 0) {
             /* Geocache Type TODO */